<?php
/**
 * Created by JetBrains PhpStorm.
 * User: stolium
 * Date: 09.02.14
 * Time: 2:00
 * To change this template use File | Settings | File Templates.
 */

namespace Stolium\TestBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class LevelType extends AbstractType{

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title', 'text')
            ->add('save', 'submit');
    }

    public function getName()
    {
        return 'level';
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Stolium\TestBundle\Entity\Level',
        ));
    }
}